<template>
	<view>
		<view class="skuImgBox">
			<swiper class="swiper" autoplay="true" :interval="2000" duration="500">
				<swiper-item v-for="banner in data.images">
					<view>
						<image class="bannerimg" mode="aspectFill" :src="banner"></image>
					</view>
				</swiper-item>
			</swiper>
		</view>
		<view class="pricetime flex_box flex_align flex_between">
			<view class="price">
				<view class="row2 flex_box flex_align">
					<view class="priceitem1 fs20"> <text class="fs14">¥</text> {{goods_price}}</view>
					<view class="priceitem2 ml3 fs12">¥{{line_price}}</view>
					<view class="save ml10"> <text
							class="fs12 color_66 px4 py2 r3">省{{numFix(line_price-goods_price)}}元</text></view>
					<!-- <image src="../../static/index/tuangou.png" class="ml7"></image> -->
				</view>
			</view>
			<view class="time" v-if="isShowTime ==1">
				<view class="timebg">
					<image src="../../static/index/juxing-icon.png"></image>
				</view>

			</view>
		</view>
		<view class="nameEnjoy border_b_1">
			<view class="left">{{data.goods_name}}</view>
			<view class="right" @click="openpopup2()">
				<view>
					<image src="../../static/index/fenxiang-icon.png"></image>
				</view>
			</view>
		</view>


		<view class="contentDetail">
			<view class="title border_b_e mb16">图文详情</view>
			<view class="content">
				<view class="color_33 mb10" @longtap="copy" v-html="data.title"></view>

				<view style="width: 100%;overflow: hidden;" v-html="data.content"></view>

			</view>
		</view>
		<view class="bottombtn">
			<view class="left">
				<view class="icontext" @click="switchIndex">
					<view>
						<image mode="aspectFit" src="../../static/tabbar-icon01.png"></image>
					</view>
					<view>首页</view>
				</view>

			</view>
			<view class="right">
				<button class="btn2" @click="openpopup(2)">立即购买</button>
			</view>
		</view>
		<view class="fixedbtn">
			<template v-if="isshow">
				<image @click="menu(1)" src="../../static/index/tupian-icon.png"></image>
				<!-- <image @click="menu(2)" src="../../static/index/shipin-icon.png"></image> -->
				<image @click="menu(3)" src="../../static/index/wenan-icon.png"></image>
				<image @click="Changeisshow" src="../../static/index/fanhui-icon.png"></image>
			</template>
			<template v-else>
				<image @click="Changeisshow" src="../../static/index/xiazai-icon.png"></image>
			</template>
		</view>
		<uni-popup ref="popup" type="bottom">
			<view class="popupBox">
				<view class="closeBtn" @click="closepopup">
					<image src="../../static/close.png"></image>
				</view>
				<view class="skuItem px15 pt30 flex_box">
					<view class="cell01 pb16">
						<image :src="specImage"></image>
					</view>
					<view class="cell02">
						<view class="row01 pr24 fs14 mt2 mb8">{{data.goods_name}}</view>
						<view class="row02 fs16 flex_box flex_align">
							<view class="bold"><text class="fs12 mr2">¥</text> {{rank_price}}</view>
							<view class="ml10 fs12 "> 团购价 <text class="fs12 mr2 ml5">¥</text> {{goods_price}}</view>
						</view>
						<view v-show="false" class="row01 pr24 mt8 fs12"> <text class="color_99">已选：</text> <text
								class="color_33">5片/盒*3盒</text></view>
					</view>
				</view>
				<view class="guige mx15" v-if="data.spec_type == 10">
					<view class="title fs12 pt10">规格</view>
					<view class="guigelist flex_box pb15 flexW">
						<view v-for="(spec,index) in data.spec" class="">
							<view @click="selectSpec(index,10,spec)"
								:class="[index==active?'guige-item active':'guige-item','fs12 r30 px16 py6 mr16 mt12']">
								单规格</view>
						</view>
					</view>
				</view>
				<view v-else>
					<view class="guige mx15" v-for="(attr, attr_idx) in specData.spec_attr" :key="attr_idx">
						<view class="title fs14 pt10">{{attr.group_name}}</view>
						<view class="guigelist flex_box pb15 flexW">
							<view v-for="(item, item_idx) in attr.spec_items" :key="item_idx"
								@click="selcetSpecMany(item,attr.spec_items)">
								<view
									:class="[item.is_check==true?'guige-item active':'guige-item','fs12 r30 px16 py6 mr16 mt12']">
									{{item.spec_value}}</view>
							</view>
						</view>
					</view>
				</view>
				<view class="countbar flex_box flex_align flex_between mx15 py15">
					<text class="left fs14">数量</text>
					<view class="right flex_box flex_align">
						<view class="jian" @click="jian">-</view>
						<view class="input">
							<input disabled="disable" v-model="count" type="number" />
						</view>
						<view class="jia" @click="jia">+</view>
					</view>
				</view>
				<view class="btn pt10 px15 pb20">
					<button @click="sure">确认</button>
				</view>
			</view>
		</uni-popup>
		<uni-popup ref="popup2" type="bottom">
			<view class="popupBox2">
				<view class="btnlist">
					<view class="btnlist-item" @click="share">
						<button open-type="share">
							<image src="../../static/index/weixin.png"></image>
						</button>
						<view>微信好友</view>
					</view>
					<view class="btnlist-item" @click="detailShare">
						<view>
							<image src="../../static/index/erweima.png"></image>
						</view>
						<view>商品海报</view>
					</view>
				</view>
				<view class="cancel" @click="closepopup2">取消</view>
			</view>
		</uni-popup>
		<uni-popup ref="popup3" type="center">
			<view class="bg_white popupBox3 py16 px12">

				<view class="mx16 py10 border_b_e flex_box flex_align" v-for="rankItem in rank">
					<text class="color_33 fs16">{{rankItem.name}}: </text>
					<text class="color_eb fs14 ml6">￥{{rankItem.price}}</text>
					<text class="t_line color_99 fs12 ml6">￥{{goods_price}}</text>
					<view class="save ml10"> <text class="fs10 color_33 px4 py2 r3">赚{{rankItem.make}}元</text></view>
				</view>

			</view>

		</uni-popup>
	</view>
</template>

<script>
	import uniPopup from '../../components/uni-popup/uni-popup.vue'
	export default {
		components: {
			uniPopup
		},
		data() {
			return {
				isshow: false,
				type: 1, //1加入购物车，2立即购买
				count: 1, //购买数量
				spuId: '', //商品id
				data: {},
				day: '00',
				shi: '00',
				fen: '00',
				miao: '00',
				interval: '',
				active: 0,
				specPrice: 0,
				cartCount: 0,
				isShowTime: 1,
				uid: -1,
				role: {},
				specData: {},
				goods_price: 0,
				line_price: 0,
				goods_spec_arr: [],
				detailData: {},
				specImage: '',
				spec_sku_id: '',
				spec_tag: '',
				buyType: 'good',
				rank: [],
				userRatio: 100,
				rank_price: 0
			}
		},
		onHide() {
			clearInterval(this.interval)
		},
		onUnload() {
			clearInterval(this.interval)
		},
		onLoad(option) {

			this.spuId = option.id;


		},

		onShow() {
			this.uid = uni.getStorageSync("id");
			console.info("====this.uid====" + this.uid);
			this.getDetail();
			let _this = this;
			this.interval = setInterval(function() {
				_this.getTime()
			}, 1000);



		},
		methods: {

			numFix(val) {

				return val.toFixed(2);
			},
			showRank() {
				this.$refs.popup3.open()
			},
			closeRank() {
				this.$refs.popup3.close()
			},
			//转发
			onShareAppMessage(res) {

				var name = this.data.goods_name;
				var title = name.substring(0, 16) + "【市场价" + Number(this.data.spec[0].line_price) + ",团购价" + Number(this
					.data.spec[
						0].goods_price) + "】";

				return {
					path: "/pages/index/skuDetail?scene=" + encodeURIComponent(this.uid + "&" + this
					.spuId), //这是为了传参 onload(data){let id=data.id;}
					title: title,
					imageUrl: this.data.images[0]
				}
			},
			detailShare() {


				uni.navigateTo({
					url: '../share/sh-goods-poster?id=' + this.spuId +
						"&name=" + encodeURIComponent(this.data.goods_name) + "&price=" + this.data.spec[0]
						.goods_price +
						"&line_price=" + this.data.spec[0].line_price + "&image=" + encodeURIComponent(this.data
							.image) + "&pin=0"
				})
			},

			menu(index) {

				if (index == 1) {
					var htmlStr = this.data.content; //  introduce 是html代码
					let imgStrs = htmlStr.match(/<img.*?>/g)
					console.log(imgStrs, '------图片标签')
					if (imgStrs) {
						// 获取每个img url
						let urls = imgStrs.map(url => {
							return url.match(/\ssrc=['"](.*?)['"]/)[1]
						})

						uni.showLoading({
							title: "图片下载中"
						})
						for (var i = 0; i < urls.length; i++) {
							this.download(urls[i], i, urls.length);
						}

						console.log(urls, '------图片url')
					} else {
						console.log('----没有图片')
					}

					//下载图片

				} else if (index == 3) {
					//复制文案

					this.copy()
				}
			},
			copy() {
				var str = this.data.title;
				str = str.replace(/<\/p>/g, "\n");
				str = str.replace(/<p>/g, "");

				uni.setClipboardData({
					data: str
				})
				this.$util.$showToast('复制成功,赶紧去分享吧', '', 'none');
			},

			download(url, i, total) {
				uni.downloadFile({
					url: url,
					success: (res) => {
						if (res.statusCode === 200) {
							this.saveImage(res, i, total);
						}
					}
				})
			},
			saveImage(res, i, total) {
				let that = this;
				let platform = uni.getStorageSync('platform');
				uni.saveImageToPhotosAlbum({
					filePath: res.tempFilePath,
					success: res => {
						that.$util.$showToast('保存成功', '', 'none');


						if (i == total - 1) {
							uni.hideLoading();
							uni.showModal({
								showCancel: false,
								title: '下载完成',
								content: '素材已下载完成，赶紧去分享吧',
								confirmColor: '#FF442F',
								success(res2) {

								}
							});
						}
					},
					fail: err => {
						console.info(err);
						//that.$util.$showToast('保存失败', '', 'none');
					}
				});
			},
			getCartList() {

				let param = {
					pageIndex: 1,
					pageSize: 40
				}
				let that = this;
				this.$api.cartList(param).then(res => {
					console.info(JSON.stringify(res));
					if (res.code == 0) {
						that.list = res.data.list;
						that.cacl();
					}

				})
			},

			cacl() {

				var count = 0;
				var price = 0;
				for (var i = 0; i < this.list.length; i++) {

					price += this.list[i].skuAmount;
					count += this.list[i].skuCount;
				}
				this.cartCount = count;
			},

			getDetail() {
				let param = {
					'goods_id': this.spuId
				}
				this.$api.skuDetail(param).then(res => {
					console.log("------------")
					console.log(res.data)
					if (res.code == 1) {
						this.data = res.data.detail;
						let newContent = this.data.content.replace(/\<img/gi,
							'<img style="max-width:100%;height:auto;display:block;"');
						this.data.content = newContent;
						this.specData = res.data.specData;
						this.role = res.data.role;
						this.cartCount = res.data.total_cart_num;
						this.detailData = res.data;
						this.rank = res.data.rank;
						this.userRatio = res.data.ratio;
						this.initSpec();
						this.getCartList();
					} else if (res.code == 0) {
						uni.showModal({
							showCancel: false,
							title: '消息提示',
							content: res.msg,
							confirmColor: '#FF442F',
							success(res2) {
								uni.navigateBack({
									delta: 1
								})
							}
						});
					}

				})
			},

			//初始化规格数据
			initSpec() {

				// 初始化商品多规格
				if (this.detailData.detail.spec_type == '20') {
					this.initManySpec();
				} else {
					this.goods_sku_id = this.detailData.detail.spec[0].spec_sku_id
					this.goods_price = this.detailData.detail.spec[0].goods_price
					this.line_price = this.detailData.detail.spec[0].line_price
					this.specImage = this.detailData.detail.image;

				}
			},
			initManySpec() {
				console.info("==initManySpec====")

				let spec_attr = this.detailData.specData.spec_attr;

				var spec_ids = new Array();
				var spec_value = new Array();
				for (var i = 0; i < spec_attr.length; i++) {
					let spec_items = spec_attr[i].spec_items;
					for (var j = 0; j < spec_items.length; j++) {

						if (spec_items[j].is_check == true) {
							spec_ids.push(spec_items[j].item_id);
							spec_value.push(spec_items[j].spec_value);
						}
					}

				}
				var spec_sku_id = "";
				var spec_tag = "";
				for (var i = 0; i < spec_ids.length; i++) {
					if (i == spec_ids.length - 1) {
						spec_sku_id += spec_ids[i];
						spec_tag += spec_value[i];
					} else {
						spec_sku_id += spec_ids[i] + "_"
						spec_tag += spec_value[i] + " ";

					}
				}
				this.spec_tag = spec_tag;
				var specList = this.detailData.specData.spec_list;
				var selectSpec = "";
				for (var i = 0; i < specList.length; i++) {
					var specSkuId = specList[i].spec_sku_id;
					if (specSkuId == spec_sku_id) {
						selectSpec = specList[i].form;
					}
				}
				this.spec_sku_id = spec_sku_id;
				this.goods_price = selectSpec.goods_price;
				this.line_price = selectSpec.line_price;

				this.rank_price = this.goods_price * this.userRatio / 100;
				this.rank_price = this.rank_price.toFixed(2);
				console.info("====rank_price=====" + this.rank_price);
				this.specImage = selectSpec.imgshow;
				if (this.specImage == null) {
					this.specImage = this.detailData.detail.image;
				}
				console.info("==specImage====" + this.specImage)

				console.info(spec_sku_id + "==spec_ids====" + JSON.stringify(spec_ids))

			},


			//选择多规格
			selcetSpecMany(item, list) {

				for (var i = 0; i < list.length; i++) {
					list[i].is_check = false;
				}
				item.is_check = true;
				this.initManySpec();
			},


			selectSpec(index, type, item) {

				this.active = index;
				if (type == 10) {
					var spec = item;
					this.specPrice = spec.salePrice;
				} else {
					var spec = item;
					this.specPrice = spec.goods_price;
				}

				console.info(JSON.stringify(item));


			},
			switchCart() {

				console.info("==cart==");
				uni.switchTab({
					url: '../cart/cart'
				})
			},
			switchIndex() {
				uni.navigateBack({
					delta: 1
				})
			},
			addCart() {
				var goods_spec_id = "";
				if (this.data.spec_type == 10) {
					goods_spec_id = this.data.spec[0].goods_spec_id;
				} else {
					goods_spec_id = this.spec_sku_id;
				}
				let param = {
					goods_id: this.spuId,
					spec_sku_id: goods_spec_id,
					num: this.count
				}
				let that = this;
				this.$api.cartAdd(param).then(res => {
					console.info(JSON.stringify(res));
					if (res.code == 1) {
						this.closepopup();
						this.cartCount = res.data.cart_total_num;
					}

				})
			},

			sure() {

				var spec = this.data.spec;
				var array = new Array();
				if (this.data.spec_type == 10) {
					var obj = {
						goods_id: this.spuId,
						skuId: spec[0].goods_spec_id,
						price: spec[0].goods_price,
						rankPrice: this.rank_price,
						specTag: '',
						count: this.count,
						image: this.data.image,
						goods_name: this.data.goods_name,
						score:this.data.score
					}
				} else {
					var obj = {
						goods_id: this.spuId,
						skuId: this.spec_sku_id,
						price: this.goods_price,
						rankPrice: this.rank_price,
						specTag: this.spec_tag,
						count: this.count,
						image: this.specImage,
						goods_name: this.data.goods_name,
						score:this.data.score
						
					}
				}

				array.push(obj);
				this.closepopup();
				console.info(array)
				uni.navigateTo({
					url: './placeOrder?item=' + JSON.stringify(array) + "&type=one"
				})



			},
			Changeisshow() {
				this.isshow = !this.isshow
			},
			openpopup(type) {
				this.type = type;
				this.$refs.popup.open();
			},
			openpopup2() {
				var str = this.uid + "&" + this.spuId;
				console.info(str);
				this.$refs.popup2.open();

			},
			closepopup() {
				this.$refs.popup.close();
			},
			closepopup2() {
				this.$refs.popup2.close();
			},
			jia() {
				if (this.buyType == 'vip') return;
				this.count = this.count + 1;
			},
			jian() {
				if (this.buyType == 'vip') return;
				if (this.count > 1) {
					this.count = this.count - 1;
				}
			},
			getTime() {
				//获取当前的日期时间
				var date = new Date();
				var thisYear = new Date().getFullYear();
				// st.innerHTML=(thisYear+1)+"年倒计时";
				thisYear = this.data.expire;
				if (uni.getSystemInfoSync().platform == 'ios') {
					thisYear = thisYear.replace('-', '/')
				}

				console.log(thisYear)
				var oldTime = new Date(thisYear);
				console.log("==vvv==" + oldTime)

				//两个事件相减除以1000就是以秒为单位计算取整
				var now = parseInt((oldTime - date) / 1000);
				//now/3600就是小时
				var day = parseInt(now / 3600) / 24;
				day = Math.floor(day);
				if (day < 10) {
					day = "0" + day;
				}
				this.day = day;
				var hour = parseInt(now / 3600) % 24;
				if (hour < 10) {
					hour = "0" + hour;
				}
				this.shi = hour;
				var minutes = parseInt(now / 60) % 60;
				if (minutes < 10) {
					minutes = "0" + minutes;
				}
				this.fen = minutes;
				var seconds = parseInt(now % 60);
				if (seconds < 10) {
					seconds = "0" + seconds;
				}
				this.miao = seconds;


				console.info("====miao=====" + this.miao);
			},
			addZero(n) {
				return n >= 10 ? n : "0" + n;
			}
		}
	}
</script>

<style lang="scss">
	.skuImgBox {
		width: 750rpx;
		height: 680rpx;

		.swiper {
			width: 750rpx;
			height: 680rpx;

			.bannerimg {
				width: 750rpx;
				height: 680rpx;
			}
		}

		image {
			width: 750rpx;
			height: 600rpx;
		}
	}

	.rightIcon {
		width: 28rpx;
		height: 28rpx;
		vertical-align: middle;
	}

	.color_99 {
		color: #999999;
	}

	.save {
		position: relative;
	}

	.save text {
		position: relative;
		background-color: #ffffb3;
		display: inline-block;
	}

	.save::before {
		content: '';
		display: inline-block;
		width: 0;
		height: 0;
		border-top: 20rpx solid transparent;
		border-bottom: 7rpx solid transparent;
		border-right: 33rpx solid #ffffb3;
		position: absolute;
		left: -12rpx;
		bottom: 0;
	}


	.rightIcon {
		width: 28rpx;
		height: 28rpx;
		vertical-align: middle;
	}

	.color_99 {
		color: #999999;
	}

	.pricetime {
		height: 110rpx;
		// display: flex;
		background: #FE5144;

		.price {
			padding-left: 30rpx;
			flex: 3;

			// .row1 {
			// 	padding-top: 10rpx;


			// }

			.row2 {

				// display: flex;
				// line-height: 110rpx;
				image {
					width: 70rpx;
					height: 36rpx;
					vertical-align: middle;
				}

				.priceitem1 {
					// font-size: 48rpx;
					color: #ffffff;
				}

				.priceitem2 {
					// margin-left: 20rpx;

					// font-size: 24rpx;
					color: #FFFFFF;
					text-decoration: line-through;
					// margin-top: 20rpx;
					position: relative;
					top: 4rpx;
				}
			}
		}

		.time {
			position: relative;
			width: 270rpx;
			height: 110rpx;

			.timebg {
				position: absolute;
				right: 0;
				bottom: 0;
				// top: -20rpx;
				z-index: 0;

				image {
					width: 320rpx;
					height: 110rpx;
					vertical-align: middle;
				}
			}

			.timetext {
				position: relative;
				z-index: 1;
				// font-size: 20rpx;
				// color: #F4382A;
				// margin-top: 10rpx;
				// margin-bottom: 10rpx;
				text-align: center;
			}

			.timeend {
				position: relative;
				z-index: 1;
				text-align: center;
				color: #1A1A1A;
				font-size: 24rpx;
				margin-right: 30rpx;
			}

			.timebox {
				position: relative;
				z-index: 1;
				// display: flex;
				// margin-right: 30rpx;

				.number {
					background: #FE5144;
					color: #FFFFFF;
					width: 38rpx;
					height: 36rpx;
					border-radius: 6rpx;
					font-size: 24rpx;
					text-align: center;
					display: inline-block;
				}

				.maohao {
					color: #FE5144;
					margin: 0 10rpx;
				}
			}
		}
	}

	.nameEnjoy {
		// border-bottom: 4rpx solid #F9F9F9;
		display: flex;
		padding: 20rpx 30rpx 30rpx 30rpx;

		.left {
			color: #1A1A1A;
			font-weight: bold;
			font-size: 30rpx;
			margin-top: 10rpx;
			flex: auto;
		}

		.right {
			min-width: 100rpx;
			text-align: right;
			font-size: 28rpx;

			image {
				width: 44rpx;
				height: 44rpx;
			}
		}
	}

	.dianlink {
		border-bottom: 20rpx solid #F9F9F9;
		display: flex;
		height: 100rpx;
		line-height: 100rpx;
		padding: 0 30rpx;

		.left {
			flex: auto;
			display: flex;

			image {
				width: 70rpx;
				height: 70rpx;
				border-radius: 50%;
				margin-top: 15rpx;
			}

			text {
				color: #1A1A1A;
				font-size: 28rpx;
				vertical-align: middle;
				margin-left: 30rpx;
			}
		}

		.right {
			image {
				width: 38rpx;
				height: 38rpx;
			}
		}
	}

	.contentDetail {
		padding-bottom: 120rpx;

		.title {
			padding: 22rpx 48rpx;
			color: #333;
			font-weight: bold;
			font-size: 36rpx;
			position: relative;
		}

		.title:after {
			content: '';
			display: block;
			position: absolute;
			top: 86rpx;
			width: 140upx;
			height: 6upx;
			background-color: #EB1A12;
			border-radius: 10upx;
		}

		.content {
			padding: 0 30rpx;

			.text {
				font-size: 28rpx;
				color: #666666;
				margin-bottom: 20rpx;
			}

			image {
				width: 100%;
			}

			// .img {
			// 	text-align: center;
			// 	width: 690rpx;
			// 	height: 600rpx;
			// }
		}
	}

	.bottombtn {
		position: fixed;
		bottom: 0;
		left: 0;
		height: 100rpx;
		z-index: 10;
		width: 100%;
		background: #FFFFFF;
		display: flex;

		.left {
			display: flex;
			flex: auto;

			.icontext {
				font-size: 20rpx;
				text-align: center;
				padding-left: 40rpx;
				position: relative;

				.gwcount {
					position: absolute;
					top: 5rpx;
					right: 5rpx;
					background: #EB1A12;
					color: #FFFFFF;
					font-size: 20rpx;
					border-radius: 50%;
					padding: 0 10rpx;
				}

				image {
					margin-top: 10rpx;
					width: 50rpx;
					height: 50rpx;
				}
			}
		}

		.right {
			display: flex;
			color: #FFFFFF;
			padding-right: 20rpx;

			.btn1 {
				width: 200rpx;
				height: 80rpx;
				line-height: 80rpx;
				background: #FD8522;
				border-radius: 10rpx;
				color: #FFFFFF;
				margin-right: 20rpx;
				margin-top: 10rpx;
				font-size: 30rpx;
			}

			.btn2 {
				margin-top: 10rpx;
				width: 200rpx;
				height: 80rpx;
				line-height: 80rpx;
				background: #EB1A12;
				border-radius: 10rpx;
				color: #FFFFFF;
				font-size: 30rpx;
			}
		}
	}

	.fixedbtn {
		position: fixed;
		right: 20rpx;
		bottom: 150rpx;
		width: 88rpx;
		z-index: 11;

		image {
			width: 88rpx;
			height: 88rpx;
			border-radius: 50%;
			margin-top: 20rpx;
		}
	}

	.popupBox {
		border-radius: 20rpx 20rpx 0 0;
		position: relative;
		background: #FFFFFF;

		.closeBtn {
			position: absolute;
			right: 24rpx;
			top: 24rpx;

			image {
				width: 44rpx;
				height: 44rpx;
			}
		}

		.skuItem {
			// padding: 84rpx 50rpx 20rpx 30rpx;
			// display: flex;

			.cell01 {
				margin-right: 30rpx;

				image {
					width: 200rpx;
					height: 200rpx;
					border-radius: 10rpx;
					vertical-align: middle;
				}
			}

			.cell02 {
				.row01 {
					color: #1A1A1A;
					// font-size: 30rpx;
					// margin: 10rpx 0 25rpx 0;
				}

				.row02 {
					color: #EB1A12;
					// font-size: 32rpx;
				}
			}
		}

		.guige {
			// margin: 30rpx 30rpx 20rpx 30rpx;
			border-top: 1rpx solid #ECEBEB;

			.title {
				color: #1A1A1A;
				// font-size: 24rpx;
				// padding: 30rpx 0;
			}

			.guigelist {
				max-height: 230rpx;
				overflow-y: scroll;

				.guige-item {
					color: #9A9A9A;
					background: #EFEFEF;
					cursor: pointer;
				}

				.guige-item.active {
					background: #EB1A12;
					color: #FFFFFF;
				}
			}
		}

		.countbar {
			border-top: 1rpx solid #ECEBEB;
			// display: flex;
			// padding: 30rpx 0;
			// margin: 0 30rpx;

			.left {
				// flex: auto;
				// font-size: 24rpx;
				color: #1A1A1A;
			}

			.right {
				// display: flex;
				border: 1rpx solid #ececec;
				height: 60rpx;
				line-height: 60rpx;

				.jian {
					color: #979797;
					border-right: 1rpx solid #ececec;
					width: 60rpx;
					text-align: center;
					font-size: 50rpx;
				}

				.jia {
					color: #1A1A1A;
					border-left: 1rpx solid #ececec;
					width: 60rpx;
					text-align: center;
					font-size: 40rpx;
				}

				.input {
					color: #1A1A1A;
					font-size: 28rpx;
					width: 80rpx;
					text-align: center;

					input {
						height: 60rpx;
						line-height: 60rpx;
					}
				}
			}
		}

		.btn {
			// padding: 20rpx 30rpx;

			button {
				width: 620rpx;
				height: 90rpx;
				line-height: 90rpx;
				text-align: center;
				color: #FFFFFF;
				background: #EB1A12;
				font-size: 30rpx;
				border-radius: 80rpx;
				margin: 0 auto;
			}

			button::after {
				border: none;
			}
		}
	}

	.popupBox2 {
		background: #FFFFFF;

		.btnlist {
			display: flex;
			padding: 45rpx 50rpx;

			.btnlist-item {
				flex: 1;
				text-align: center;

				image {
					width: 80rpx;
					height: 80rpx;
					margin-bottom: 16rpx;
				}

				font-size: 24rpx;
				color: #666666;
				text-align: center;
			}

			button {
				font-size: 28rpx;
				color: #666666;
				// width: 200rpx;
				margin-left: -10rpx;
				background: none !important;
				color: #FFFFFF;
			}
		}

		.cancel {
			border-top: 20rpx solid #F9F9F9;
			height: 100rpx;
			line-height: 100rpx;
			text-align: center;
		}
	}

	.colorea {
		color: #ea7e76;
	}

	.border_b_5 {
		border-bottom: 10rpx solid #F9F9F9;
	}

	.border_b_e {
		border-bottom: 2rpx solid #EEEEEE;
	}

	.delIcon {
		width: 50upx;
		height: 50upx;
		position: absolute;
		right: 30rpx;
		top: 24upx;
	}

	.popupBox3 {
		width: 600upx;
		border-radius: 12upx;
	}

	.t_line {
		text-decoration: line-through;
	}

	.popupBox3 .save {
		top: -6upx;
	}

	.popupBox3 .save text {
		background-color: #ffbf00;
	}

	.popupBox3 .save::before {
		border-right: 33rpx solid #ffbf00;
		bottom: 6upx;
	}

	.popupBox3 .border_b_e:last-child {
		border: none
	}
</style>
